{{if validation_errors()}}
<ul class="message error">
    <li>{{validation_errors()}}</li>
</ul>
{{/if}}

<div class="clear"></div>
<form class="block-content form" id="simple_form" method="post" action="create">
    <h1>{{$role->lang->line('roles')}}</h1>
    <ul class="tabs js-tabs same-height">
        <li class="current"><a href="#tab-locales" title="Locales">{{$role->lang->line('current')}}</a></li>
        <li><a href="#tab-options" title="Options">{{$role->lang->line('options')}}</a></li>    
    </ul>
    <div class="tabs-content">

        <div id="tab-locales">
            {{if isset($role->id)}}{{form_hidden('id', $role->id)}}{{/if}}

            <fieldset class="grey-bg required">			
                <legend>{{$role->lang->line('required')}}</legend>
                <p>
                    <label>{{$role->lang->line('description')}}</label>
                    <input type="text" name="title" id="simple-required" value="{{if isset($role->title)}}{{$role->title}}{{/if}}" class="full-width">
                    {{form_error('title')}}
                </p>

                <p>
                    <label>{{$role->localize_label('code')}}</label>
                    <input type="text" name="code" id="simple-required" value="{{if isset($role->code)}}{{$role->code}}{{/if}}" class="full-width">
                    {{form_error('code')}}
                </p>
            </fieldset>
        </div>
        <div id="tab-options">
            <fieldset>
                <legend>{{$role->lang->line('other_info')}}</legend>

                <p>
                    <label>{{$role->lang->line('description')}}</label>
                    <textarea name="description" cols="10" class="full-width text-editor tinymcefull">{{if isset($role->description)}}{{$role->description}}{{/if}}</textarea>
                </p>
            </fieldset>
        </div>
        <br/><br/><br/><br/>
        <fieldset class="grey-bg no-margin">
            <legend>{{$role->lang->line('action')}}</legend>
            <p class="input-with-button">
                <button type="submit">{{$role->lang->line('save')}}</button>
            </p>
        </fieldset>	

    </div>
</form>
